  <script type="text/javascript">
    function btn1Click(){
      var komunikat = "";
      var chb1 = document.getElementById('chb1');
      var chb2 = document.getElementById('chb2');
      var chb3 = document.getElementById('chb3');
      if(!chb1.checked && !chb2.checked && 
         !chb3.checked){
         komunikat = "Nie została wybrana żadna opcja.";
      }
      else{
        komunikat = "Zostały wybrane opcje:"
        if(chb1.checked)
          komunikat += "\nopcja " + chb1.value;
        if(chb2.checked)
          komunikat += "\nopcja " + chb2.value;
        if(chb3.checked)
          komunikat += "\nopcja " + chb3.value;
      }
      alert(komunikat);
    }
  </script>